
public class Node {

	private Node left;
	private Node right;
	private char caractere;
	private int frequence;
	
	public Node(char caractere, int frequence) {
		this.left = null;
		this.right = null;
		this.caractere = caractere;
		this.frequence = frequence;
	}
	
	public Node(Node left, Node right)
	{
		this.left = left;
		this.right = right;
		this.caractere = '\256';
		this.frequence = left.getFrequence() + right.getFrequence();
	}
	
	public char getCaractere() {
		return this.caractere;
	}
	
	public int getFrequence() {
		return this.frequence;
	}
	
	public Node getLeft() {
		return this.left;
	}
	
	public Node getRight() {
		return this.right;
	}
}
